﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.Specialized;
using System.IO;

namespace SpringPlaceHolder {
	public class PropertyFileSettings : NameValueCollection  {

		private String configFile = "properties.config";


		public PropertyFileSettings() {
			// The Constructor loads the values from properties.config file
			TextReader reader = new StreamReader(configFile);

			// For each line we load the property name and value
			String line = reader.ReadLine();
			while (!String.IsNullOrEmpty(line)) {
				String[] pair = line.Split('=');
				this[pair[0]] = pair[1];

				line = reader.ReadLine();
			}
		}
	}
}
